<?php

require_once('../../config.php');

/**
 * @todo: Der Inhalt der Variable $currencyCode darf nicht "hartkodiert" sein.
 */
$productId = intval($_GET['productId']);

if($productId > 0) {
	require_once(WSB_MODULES_PATH .'sherpa/models/BasketGateway.php');
	$gateway = new Sherpa_Model_BasketGateway();
	$affectedRows = $gateway->removeProduct($productId);
	$success = empty($affectedRows) ? false : true;

	header('Content-type: application/json');
	echo Zend_Json::encode($success);
	exit;
}

header( 'HTTP/1.1 404 Not Found' );